Most devices have a set of resources that is limited in some way. For example, a device such as a mobile phone or a notebook PC (personal computer) may have limited energy available from its battery, limited processing power available from its CPU (central processing unit) and limited memory available for storage of program data. In order to provide the user with the best service from the device it is desirable to manage the available resources so they can be directed to the functions that are most important to the user at any particular time.